<!--
 * @Descripttion: 
 * @Author: voanit
 * @Date: 2022-08-21 08:51:54
 * @LastEditors: voanit
 * @LastEditTime: 2022-08-21 14:47:05
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }

    div {
      /* 
      rem=====移动端
      vw / vh   
       vw:把屏幕宽度分成100等分
       vh:把屏幕高度分成100等分
      */
      width: 50vw;
      height: 50vh;
      background: pink;
      margin-top: 10%;
    }
  </style>
</head>

<body>
  <div>
    box
  </div>
</body>

</html>